<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MRSL Motion Primitive Library: include/mpl_traj_solver/poly_traj.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MRSL Motion Primitive Library
   &#160;<span id="projectnumber">1.2</span>
   </div>
   <div id="projectbrief">A motion primitive library for generating trajectory for mobile robots</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_8e76f29c55fc3c0dcffde3c31a52a0ea.html">mpl_traj_solver</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">poly_traj.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="poly__traj_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#ifndef MPL_POLY_TRAJ_H</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#define MPL_POLY_TRAJ_H</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="primitive_8h.html">mpl_basis/primitive.h</a>&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;deque&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="keyword">template</span> &lt;<span class="keywordtype">int</span> Dim&gt;</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="classPolyTraj.html">   17</a></span>&#160;<span class="keyword">class </span><a class="code" href="classPolyTraj.html">PolyTraj</a> {</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  <a class="code" href="classPolyTraj.html#ad12df6c77e33b767117169d2b8605fe4">PolyTraj</a>();</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classPolyTraj.html#aeef32c15c08d1cab7522dbfe5f68f479">clear</a>();</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classPolyTraj.html#addca71be83117522d69739b81dcd3f78">setWaypoints</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#a6b9210d48a0a541940af71827aad1b41">vec_E</a>&lt;<a class="code" href="structWaypoint.html">Waypoint&lt;Dim&gt;</a>&gt;&amp; ws);</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classPolyTraj.html#ae4d303744711351ff3aa483bd474d2f2">setTime</a>(<span class="keyword">const</span> std::vector&lt;decimal_t&gt;&amp; dts);</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classPolyTraj.html#a32ee057ca68dd2559c1a773ee0e6a291">addCoeff</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#a44c975fba9ebd61e295d78215b6569c3">MatDNf&lt;Dim&gt;</a>&amp; coeff);</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;  <a class="code" href="data__type_8h.html#a6b9210d48a0a541940af71827aad1b41">vec_E&lt;Primitive&lt;Dim&gt;</a>&gt; <a class="code" href="classPolyTraj.html#a302096dd4b586c65c973beb3705d450e">toPrimitives</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;  <a class="code" href="structWaypoint.html">Waypoint&lt;Dim&gt;</a> <a class="code" href="classPolyTraj.html#a38b02c6a5fe698e0b34d77d70c3660b4">evaluate</a>(<a class="code" href="data__type_8h.html#a7c99d9360fc6cac2762b786e2fb52266">decimal_t</a> t) <span class="keyword">const</span>;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  <a class="code" href="data__type_8h.html#a7c99d9360fc6cac2762b786e2fb52266">decimal_t</a> <a class="code" href="classPolyTraj.html#ae58e7e2d0f842820f9cfd1a39e1ae7b5">getTotalTime</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  <a class="code" href="data__type_8h.html#a44c975fba9ebd61e295d78215b6569c3">MatDNf&lt;Dim&gt;</a> <a class="code" href="classPolyTraj.html#ade84aef86cc05cf2e8f0d3cf5583c655">p</a>();</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;  std::vector&lt;decimal_t&gt; waypoint_times_;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  std::vector&lt;decimal_t&gt; dts_;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  <a class="code" href="data__type_8h.html#a6b9210d48a0a541940af71827aad1b41">vec_E&lt;Waypoint&lt;Dim&gt;</a>&gt; waypoints_;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  std::deque&lt;MatDNf&lt;Dim&gt;, Eigen::aligned_allocator&lt;MatDNf&lt;Dim&gt;&gt;&gt; coefficients_;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;};</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="poly__traj_8h.html#af39053e2f11580427f8682cd1e114900">   46</a></span>&#160;<span class="keyword">typedef</span> <a class="code" href="classPolyTraj.html">PolyTraj&lt;2&gt;</a> <a class="code" href="poly__traj_8h.html#af39053e2f11580427f8682cd1e114900">PolyTraj2D</a>;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="poly__traj_8h.html#ade906c4efac6ed2ead98df65f4952c9d">   49</a></span>&#160;<span class="keyword">typedef</span> <a class="code" href="classPolyTraj.html">PolyTraj&lt;3&gt;</a> <a class="code" href="poly__traj_8h.html#ade906c4efac6ed2ead98df65f4952c9d">PolyTraj3D</a>;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="primitive_8h_html"><div class="ttname"><a href="primitive_8h.html">primitive.h</a></div><div class="ttdoc">Primitive classes. </div></div>
<div class="ttc" id="classPolyTraj_html_ade84aef86cc05cf2e8f0d3cf5583c655"><div class="ttname"><a href="classPolyTraj.html#ade84aef86cc05cf2e8f0d3cf5583c655">PolyTraj::p</a></div><div class="ttdeci">MatDNf&lt; Dim &gt; p()</div><div class="ttdoc">Get the p. </div><div class="ttdef"><b>Definition:</b> poly_traj.cpp:91</div></div>
<div class="ttc" id="classPolyTraj_html_a302096dd4b586c65c973beb3705d450e"><div class="ttname"><a href="classPolyTraj.html#a302096dd4b586c65c973beb3705d450e">PolyTraj::toPrimitives</a></div><div class="ttdeci">vec_E&lt; Primitive&lt; Dim &gt; &gt; toPrimitives() const</div><div class="ttdoc">Convert to Primitive class. </div><div class="ttdef"><b>Definition:</b> poly_traj.cpp:72</div></div>
<div class="ttc" id="structWaypoint_html"><div class="ttname"><a href="structWaypoint.html">Waypoint</a></div><div class="ttdoc">Waypoint base class. </div><div class="ttdef"><b>Definition:</b> waypoint.h:23</div></div>
<div class="ttc" id="data__type_8h_html_a44c975fba9ebd61e295d78215b6569c3"><div class="ttname"><a href="data__type_8h.html#a44c975fba9ebd61e295d78215b6569c3">MatDNf</a></div><div class="ttdeci">Eigen::Matrix&lt; decimal_t, Eigen::Dynamic, N &gt; MatDNf</div><div class="ttdoc">MxN Eigen matrix with M unknown. </div><div class="ttdef"><b>Definition:</b> data_type.h:67</div></div>
<div class="ttc" id="data__type_8h_html_a6b9210d48a0a541940af71827aad1b41"><div class="ttname"><a href="data__type_8h.html#a6b9210d48a0a541940af71827aad1b41">vec_E</a></div><div class="ttdeci">std::vector&lt; T, Eigen::aligned_allocator&lt; T &gt; &gt; vec_E</div><div class="ttdoc">Pre-allocated std::vector for Eigen using vec_E. </div><div class="ttdef"><b>Definition:</b> data_type.h:53</div></div>
<div class="ttc" id="classPolyTraj_html_a32ee057ca68dd2559c1a773ee0e6a291"><div class="ttname"><a href="classPolyTraj.html#a32ee057ca68dd2559c1a773ee0e6a291">PolyTraj::addCoeff</a></div><div class="ttdeci">void addCoeff(const MatDNf&lt; Dim &gt; &amp;coeff)</div><div class="ttdoc">Add coefficients. </div><div class="ttdef"><b>Definition:</b> poly_traj.cpp:54</div></div>
<div class="ttc" id="classPolyTraj_html_addca71be83117522d69739b81dcd3f78"><div class="ttname"><a href="classPolyTraj.html#addca71be83117522d69739b81dcd3f78">PolyTraj::setWaypoints</a></div><div class="ttdeci">void setWaypoints(const vec_E&lt; Waypoint&lt; Dim &gt;&gt; &amp;ws)</div><div class="ttdoc">Set waypoints. </div><div class="ttdef"><b>Definition:</b> poly_traj.cpp:59</div></div>
<div class="ttc" id="classPolyTraj_html"><div class="ttname"><a href="classPolyTraj.html">PolyTraj</a></div><div class="ttdoc">Trajectory class for solving n-th polynomial with PolySolver. </div><div class="ttdef"><b>Definition:</b> poly_traj.h:17</div></div>
<div class="ttc" id="poly__traj_8h_html_af39053e2f11580427f8682cd1e114900"><div class="ttname"><a href="poly__traj_8h.html#af39053e2f11580427f8682cd1e114900">PolyTraj2D</a></div><div class="ttdeci">PolyTraj&lt; 2 &gt; PolyTraj2D</div><div class="ttdoc">PolyTraj in 2D. </div><div class="ttdef"><b>Definition:</b> poly_traj.h:46</div></div>
<div class="ttc" id="classPolyTraj_html_a38b02c6a5fe698e0b34d77d70c3660b4"><div class="ttname"><a href="classPolyTraj.html#a38b02c6a5fe698e0b34d77d70c3660b4">PolyTraj::evaluate</a></div><div class="ttdeci">Waypoint&lt; Dim &gt; evaluate(decimal_t t) const</div><div class="ttdoc">Evaluate the waypoint at t. </div><div class="ttdef"><b>Definition:</b> poly_traj.cpp:7</div></div>
<div class="ttc" id="poly__traj_8h_html_ade906c4efac6ed2ead98df65f4952c9d"><div class="ttname"><a href="poly__traj_8h.html#ade906c4efac6ed2ead98df65f4952c9d">PolyTraj3D</a></div><div class="ttdeci">PolyTraj&lt; 3 &gt; PolyTraj3D</div><div class="ttdoc">PolyTraj in 3D. </div><div class="ttdef"><b>Definition:</b> poly_traj.h:49</div></div>
<div class="ttc" id="classPolyTraj_html_ae58e7e2d0f842820f9cfd1a39e1ae7b5"><div class="ttname"><a href="classPolyTraj.html#ae58e7e2d0f842820f9cfd1a39e1ae7b5">PolyTraj::getTotalTime</a></div><div class="ttdeci">decimal_t getTotalTime() const</div><div class="ttdoc">Get the total time for the trajectory. </div><div class="ttdef"><b>Definition:</b> poly_traj.cpp:43</div></div>
<div class="ttc" id="data__type_8h_html_a7c99d9360fc6cac2762b786e2fb52266"><div class="ttname"><a href="data__type_8h.html#a7c99d9360fc6cac2762b786e2fb52266">decimal_t</a></div><div class="ttdeci">double decimal_t</div><div class="ttdoc">Rename the float type used in lib. </div><div class="ttdef"><b>Definition:</b> data_type.h:49</div></div>
<div class="ttc" id="classPolyTraj_html_ae4d303744711351ff3aa483bd474d2f2"><div class="ttname"><a href="classPolyTraj.html#ae4d303744711351ff3aa483bd474d2f2">PolyTraj::setTime</a></div><div class="ttdeci">void setTime(const std::vector&lt; decimal_t &gt; &amp;dts)</div><div class="ttdoc">Set time allocation. </div><div class="ttdef"><b>Definition:</b> poly_traj.cpp:64</div></div>
<div class="ttc" id="classPolyTraj_html_ad12df6c77e33b767117169d2b8605fe4"><div class="ttname"><a href="classPolyTraj.html#ad12df6c77e33b767117169d2b8605fe4">PolyTraj::PolyTraj</a></div><div class="ttdeci">PolyTraj()</div><div class="ttdoc">Simple constructor. </div><div class="ttdef"><b>Definition:</b> poly_traj.cpp:4</div></div>
<div class="ttc" id="classPolyTraj_html_aeef32c15c08d1cab7522dbfe5f68f479"><div class="ttname"><a href="classPolyTraj.html#aeef32c15c08d1cab7522dbfe5f68f479">PolyTraj::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdoc">Clear. </div><div class="ttdef"><b>Definition:</b> poly_traj.cpp:48</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
